<?php
/**
* All "version" models in a master->version structure should use this manager.
*
* Copyright (c) 2009 James Gauld <james@jamesgauld.net>
* This file is part of Scribble.
* @license http://www.scribblecms.co.uk/license.txt
*
* @package Scribble
*/
use Buan\ModelManager;
class ScribbleVersionModelManager extends ScribbleModelManager {

	public function save($model) {
		if(!$model->isInDatabase()) {
			$model->version = time();
		}
		return parent::save($model);
	}
}
?>